package one_07_OOP.demo03;

public class Application {
    public static void main(String[] args) {
        method01();
    }
    public static void method01(){
        Student s1 = new Student();
        //s1.name;// name属性已经被私有，无法直接调用

        // 需要间接调用
        String name = s1.getName();

        // 设置值
        s1.setName("秦寿");
        String name1 = s1.getName();

        System.out.println(name);
        System.out.println(name1);
    }
}
